package com.example.flshtarvel.service;

import com.example.flshtarvel.entity.ArticleType;
import com.example.flshtarvel.mapper.ArticleTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

@Service
public class ArticleTypeService {
    @Autowired(required = false)
    ArticleTypeMapper articleTypeMapper;

    public int insertMessageType(ArticleType articleType){
        articleType.setArticleTypeId(UUID.randomUUID().toString());
        return articleTypeMapper.insertArticleType(articleType);
    }

    public List<ArticleType> selectAllArticleType(){
        return articleTypeMapper.selectAllArticleType();
    }
}
